package example

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type StudentProfileRouter struct {}

// InitStudentProfileRouter 初始化 学生档案 路由信息
func (s *StudentProfileRouter) InitStudentProfileRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	SPRouter := Router.Group("SP").Use(middleware.OperationRecord())
	SPRouterWithoutRecord := Router.Group("SP")
	SPRouterWithoutAuth := PublicRouter.Group("SP")
	{
		SPRouter.POST("createStudentProfile", SPApi.CreateStudentProfile)   // 新建学生档案
		SPRouter.DELETE("deleteStudentProfile", SPApi.DeleteStudentProfile) // 删除学生档案
		SPRouter.DELETE("deleteStudentProfileByIds", SPApi.DeleteStudentProfileByIds) // 批量删除学生档案
		SPRouter.PUT("updateStudentProfile", SPApi.UpdateStudentProfile)    // 更新学生档案
	}
	{
		SPRouterWithoutRecord.GET("findStudentProfile", SPApi.FindStudentProfile)        // 根据ID获取学生档案
		SPRouterWithoutRecord.GET("getStudentProfileList", SPApi.GetStudentProfileList)  // 获取学生档案列表
	}
	{
	    SPRouterWithoutAuth.GET("getStudentProfilePublic", SPApi.GetStudentProfilePublic)  // 学生档案开放接口
	}
}
